package com.hzj.service;

import com.hzj.config.FeignHeaderConfiguration;
import com.hzj.pojo.BolgComment;
import com.hzj.pojo.BolgDatail;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;
import java.util.List;

@Component

@FeignClient(name = "PROVIDER", fallback = BokeServiceHystrix.class, configuration = FeignHeaderConfiguration.class)
public interface BokeService {
    @RequestMapping("/test")
    public String test();

    @RequestMapping("/login")
    public String login(@RequestParam String username, @RequestParam String password);

    @RequestMapping("/showAll")
    public List<BolgDatail> showAll();

    @RequestMapping("/add")
    public String add(@RequestBody BolgComment bolgComment);

    @RequestMapping("/session")
    public String session();

    @RequestMapping("/session1")
    public String session1();
}
